



<div class="x-body">
    <form class="layui-form form_single" action="{:url()}" method="post">

        <div class="layui-form-item">
            <label class="layui-form-label">
                币种:
            </label>
            <div class="layui-input-block">
                <select id="symbol" name="symbol">
                    
                    <option>eth</option>
                    <option>usdt</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                数额:
            </label>
            <div class="layui-input-block">
                <input type="text" name="number">


            </div>
        </div>


        <input type="hidden" name="user_id" value="{$user_id}"/>

        <div class="box-footer">



            <button type="button"  class="layui-btn ladda-button" data-style="slide-up"  onclick="save()">
                确 定
            </button>
            <a class="layui-btn ladda-button" onclick="javascript:cancel();return false;"><i class="fa fa-history"></i> 取 消</a>


        </div>

    </form>
</div>

<script>
    layui.use('laydate', function(){
        layer=layui.layer;
        //执行一个laydate实例
    });
    function save(){
        var symbol=$("[name='symbol']").val();
        var number=$("[name='number']").val();
        var user_id=$("[name='user_id']").val();
        $.post("{:url('mine_transfer')}",{symbol:symbol,number:number,user_id:user_id},function (d) {
            if(d.code==1){
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);//关闭当
                parent.location.reload();
            }else{
                layer.msg(d.msg);
            }
        })
    }

    function cancel() {

        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);//关闭当
    }

</script>